/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_statement_line
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_statement_line extends PO implements I_hrm_statement_line, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121223L;

    /** the default Constructor */
    public X_hrm_statement_line(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_statement_line (Properties ctx, int hrm_statement_line_ID, String trxName)
    {
      super (ctx, hrm_statement_line_ID, trxName);
      /** if (hrm_statement_line_ID == 0)
        {
			setAmount (Env.ZERO);
// 0
			setAmountPaid (Env.ZERO);
// 0
			setC_BPartner_ID (0);
			sethrm_statement_ID (0);
			sethrm_statement_line_ID (0);
			setLine (Env.ZERO);
// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM hrm_statement_line WHERE hrm_statement_ID=@hrm_statement_ID@
        } */
    }

    /** Load Constructor */
    public X_hrm_statement_line (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_statement_line[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set Amount.
		@param Amount 
		Amount in a defined currency
	  */
	public void setAmount (BigDecimal Amount)
	{
		set_Value (COLUMNNAME_Amount, Amount);
	}

	/** Get Amount.
		@return Amount in a defined currency
	  */
	public BigDecimal getAmount () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set AmountPaid.
		@param AmountPaid AmountPaid	  */
	public void setAmountPaid (BigDecimal AmountPaid)
	{
		set_Value (COLUMNNAME_AmountPaid, AmountPaid);
	}

	/** Get AmountPaid.
		@return AmountPaid	  */
	public BigDecimal getAmountPaid () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmountPaid);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Description.
		@param Description 
		Optional short description of the record
	  */
	public void setDescription (String Description)
	{
		set_Value (COLUMNNAME_Description, Description);
	}

	/** Get Description.
		@return Optional short description of the record
	  */
	public String getDescription () 
	{
		return (String)get_Value(COLUMNNAME_Description);
	}

	public I_hrm_statement gethrm_statement() throws RuntimeException
    {
		return (I_hrm_statement)MTable.get(getCtx(), I_hrm_statement.Table_Name)
			.getPO(gethrm_statement_ID(), get_TrxName());	}

	/** Set hrm_statement.
		@param hrm_statement_ID hrm_statement	  */
	public void sethrm_statement_ID (int hrm_statement_ID)
	{
		if (hrm_statement_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_ID, Integer.valueOf(hrm_statement_ID));
	}

	/** Get hrm_statement.
		@return hrm_statement	  */
	public int gethrm_statement_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_statement_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_statement_line.
		@param hrm_statement_line_ID hrm_statement_line	  */
	public void sethrm_statement_line_ID (int hrm_statement_line_ID)
	{
		if (hrm_statement_line_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_line_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_line_ID, Integer.valueOf(hrm_statement_line_ID));
	}

	/** Get hrm_statement_line.
		@return hrm_statement_line	  */
	public int gethrm_statement_line_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_statement_line_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Line.
		@param Line 
		Line No
	  */
	public void setLine (BigDecimal Line)
	{
		set_Value (COLUMNNAME_Line, Line);
	}

	/** Get Line.
		@return Line No
	  */
	public BigDecimal getLine () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Line);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}
}